/*
 * @Author: Warren
 * @Date: 2025-06-09 11:51:23
 * @LastEditors: Warren
 * @LastEditTime: 2025-07-23 21:55:21
 * @FilePath: /nest-web/src/modules/auth/auth.controller.ts
 * @Description: 请填写文件说明
 */
import { Controller, Post, Body, Get } from '@nestjs/common';
import { AuthService } from './auth.service';
import { LoginAuthDto } from './dto/login-auth.dto';
import { UserService } from '../user/user.service';
// import { CreateAuthDto } from './dto/create-auth.dto';
// import { UpdateAuthDto } from './dto/update-auth.dto';

@Controller('auth')
export class AuthController {

    /* 当创建控制器实例时，自动将所需的依赖,通过构造函数注入 */
    constructor(
        private readonly authService: AuthService,
        private readonly userService: UserService
    ) {}

    @Get('sign')
    sign() {
        this.userService.create()
    }

    @Post('login')
    login(@Body() loginAuthDto: LoginAuthDto ) {
        return this.authService.login(loginAuthDto);
    }
    //   @Post()
    //     create(@Body() createAuthDto: CreateAuthDto) {
    //         return this.authService.create(createAuthDto);
    //     }

    //   @Get()
    //   findAll() {
    //       return this.authService.findAll();
    //   }

    //   @Get(':id')
    //   findOne(@Param('id') id: string) {
    //       return this.authService.findOne(+id);
    //   }

    //   @Patch(':id')
    //   update(@Param('id') id: string, @Body() updateAuthDto: UpdateAuthDto) {
    //       return this.authService.update(+id, updateAuthDto);
    //   }

    //   @Delete(':id')
    //   remove(@Param('id') id: string) {
    //       return this.authService.remove(+id);
    //   }
}
